#include<iostream>
#include<unordered_map>
using namespace std;
const int MOD=1e9+7;
int n;

int main()
{
    cin>>n;
    unordered_map<int,int> primes;
    while(n--)
    {
        int x;scanf("%d",&x);
        for(int i=2;i<=x/i;++i)
        {
            while(x%i==0)
            {
                x/=i;
                primes[i]++;
            }
        }
        if(x>1) primes[x]++;
    }
    
    long long res=1;
    for(auto [b,i]:primes)
    {
        long long t=1;
        while(i--)
        {
            t=(t*b+1)%MOD;
        }
        res=res*t%MOD;
    }
    cout<<res;
    return 0;
}